﻿using System;
using System.ComponentModel.Composition;

namespace SilverlightCalculator.CalculatorValidationRules
{
    [Export(typeof(ICalculatorValidationRule))]
    public class ValidateValueIsNotNullOrEmpty : ICalculatorValidationRule
    {
        public bool IsValid(string value)
        {
            return !String.IsNullOrEmpty(value);
        }

        public string ErrorMessage
        {
            get
            {
                return "Please enter a number";
            }
        }
    }
}